//这个用于路由模块的封装
const express = require('express')
const router = express.Router();
const handler = require('./handler')
router.get('/getalldata',(req,res) => {
    handler.getalldata(req, res) 
})

//文件上传
router.post('/uploadFile',(req,res) => {
    handler.uploadFile(req,res)
})
router.post('/add',(req,res) => {
    handler.add(req,res)
})
router.get('/getHeroById',(req,res) => {
    handler.getHeroById(req,res)
})
router.post('/edit',(req,res) => {
    handler.edit(req,res)
})
router.get('/delete',(req,res) => {
    handler.delete(req,res)
})
//暴露
module.exports = router;